```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Git版本控制完全指南 - 技术小馆</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.8;
        }
        h1, h2, h3, h4, h5, h6 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
            margin-top: 2rem;
            margin-bottom: 1rem;
            color: #222;
        }
        h1 {
            font-size: 2.5rem;
            border-bottom: 1px solid #eee;
            padding-bottom: 0.5rem;
        }
        h2 {
            font-size: 1.8rem;
            border-left: 4px solid #38b2ac;
            padding-left: 1rem;
        }
        h3 {
            font-size: 1.4rem;
        }
        .hero {
            background: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%);
            color: white;
            padding: 6rem 0;
            margin-bottom: 3rem;
            position: relative;
            overflow: hidden;
        }
        .hero-content {
            position: relative;
            z-index: 2;
        }
        .hero-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
            background-size: cover;
            opacity: 0.15;
        }
        .card {
            transition: all 0.3s ease;
            border-radius: 0.5rem;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }
        .command-box {
            background-color: #2d3748;
            color: #f7fafc;
            padding: 1rem;
            border-radius: 0.5rem;
            font-family: 'Courier New', monospace;
            margin: 1rem 0;
            overflow-x: auto;
        }
        .command-box .prompt {
            color: #68d391;
            margin-right: 0.5rem;
        }
        .command-box .comment {
            color: #a0aec0;
        }
        .image-container {
            margin: 2rem 0;
            text-align: center;
        }
        .image-container img {
            max-width: 100%;
            border-radius: 0.5rem;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .table-container {
            overflow-x: auto;
            margin: 2rem 0;
        }
        table {
            width: 100%;
            border-collapse: collapse;
        }
        th, td {
            border: 1px solid #e2e8f0;
            padding: 0.75rem;
            text-align: left;
        }
        th {
            background-color: #f7fafc;
            font-weight: 600;
        }
        tr:nth-child(even) {
            background-color: #f8fafc;
        }
        .highlight-box {
            border-left: 4px solid #4299e1;
            background-color: #ebf8ff;
            padding: 1rem;
            margin: 2rem 0;
            border-radius: 0 0.5rem 0.5rem 0;
        }
        .feature-icon {
            font-size: 2rem;
            color: #4299e1;
            margin-right: 1rem;
        }
        .nav-toc {
            position: sticky;
            top: 2rem;
        }
        .nav-toc a {
            display: block;
            padding: 0.5rem 1rem;
            color: #4a5568;
            border-left: 3px solid transparent;
            transition: all 0.2s ease;
        }
        .nav-toc a:hover {
            color: #2b6cb0;
            background-color: #ebf8ff;
            border-left: 3px solid #4299e1;
        }
        .nav-toc a.active {
            color: #2b6cb0;
            font-weight: 500;
            border-left: 3px solid #4299e1;
        }
        .footer {
            background-color: #1a202c;
            color: #f7fafc;
            padding: 3rem 0;
            margin-top: 4rem;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero">
        <div class="hero-bg"></div>
        <div class="container mx-auto px-6 hero-content">
            <div class="max-w-3xl mx-auto text-center">
                <h1 class="text-4xl md:text-5xl font-bold mb-4">Git版本控制完全指南</h1>
                <p class="text-xl md:text-2xl mb-8 opacity-90">掌握分布式版本控制系统的核心概念与实战技巧</p>
                <div class="flex justify-center space-x-4">
                    <a href="#introduction" class="px-6 py-3 bg-white text-teal-600 font-semibold rounded-lg shadow-md hover:bg-gray-100 transition duration-300">
                        <i class="fas fa-book-open mr-2"></i>开始阅读
                    </a>
                    <a href="https://git-scm.com/" target="_blank" class="px-6 py-3 bg-transparent border-2 border-white text-white font-semibold rounded-lg hover:bg-white hover:text-teal-600 transition duration-300">
                        <i class="fab fa-git-alt mr-2"></i>Git官网
                    </a>
                </div>
            </div>
        </div>
    </section>

    <div class="container mx-auto px-6 py-8">
        <div class="flex flex-col lg:flex-row">
            <!-- Main Content -->
            <div class="w-full lg:w-3/4 lg:pr-8">
                <!-- Introduction Section -->
                <section id="introduction" class="mb-12">
                    <h2>一、引言</h2>
                    <div class="grid md:grid-cols-2 gap-6 mb-8">
                        <div class="card bg-white p-6">
                            <div class="flex items-center mb-4">
                                <i class="feature-icon fas fa-user"></i>
                                <h3 class="text-xl font-semibold">单人开发</h3>
                            </div>
                            <p class="text-gray-700">在单人开发过程中，需要进行版本管理，以利于开发进度的控制。</p>
                        </div>
                        <div class="card bg-white p-6">
                            <div class="flex items-center mb-4">
                                <i class="feature-icon fas fa-users"></i>
                                <h3 class="text-xl font-semibold">多人协作</h3>
                            </div>
                            <p class="text-gray-700">在多人开发过程中，不仅需要版本管理，还需要进行多人协同控制。</p>
                        </div>
                    </div>
                </section>

                <!-- About Git Section -->
                <section id="about-git" class="mb-12">
                    <h2>二、介绍</h2>
                    <div class="card bg-white p-6 mb-8">
                        <p class="mb-4">Git是一个开源的分布式版本控制系统，用于敏捷高效地处理任何或小或大的项目。</p>
                        <p>Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。</p>
                    </div>
                    <div class="highlight-box">
                        <p class="font-semibold mb-2">Git官网:</p>
                        <a href="https://git-scm.com/" target="_blank" class="text-blue-600 hover:underline">https://git-scm.com/</a>
                    </div>
                </section>

                <!-- Installation Section -->
                <section id="installation" class="mb-12">
                    <h2>三、Git安装</h2>
                    <div class="card bg-white p-6 mb-6">
                        <h3 class="text-xl font-semibold mb-4">下载Git</h3>
                        <a href="https://git-scm.com/downloads" target="_blank" class="inline-block mb-4 text-blue-600 hover:underline">https://git-scm.com/downloads</a>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196084674-943c129b-9da6-493a-9903-ea0d6ad8d2b7.jpeg" alt="Git下载页面" class="mx-auto">
                        </div>
                        <p class="mt-4">安装，除了安装位置外，其他一直下一步即可</p>
                    </div>

                    <div class="card bg-white p-6">
                        <h3 class="text-xl font-semibold mb-4">基本配置</h3>
                        <div class="command-box mb-4">
                            <span class="comment"># 安装后，打开cmd ，自报家门</span><br>
                            <span class="comment"># 如下信息会在提交代码时要使用，记录在你的每次提交中。以后才知道哪次提交是谁做的，"git log"可以查看</span><br>
                            <span class="comment"># 执行：</span><br>
                            <div>
                                <span class="prompt">$</span> git config --global user.name "Your Name"  <span class="comment">#用户名</span><br>
                                <span class="prompt">$</span> git config --global user.email "email@example.com"  <span class="comment">#邮箱</span>
                            </div>
                        </div>
                        <div class="command-box mb-4">
                            <span class="comment"># 查看信息</span><br>
                            <span class="prompt">$</span> git config -l 
                        </div>
                        <div class="command-box">
                            <span class="comment"># 测试：cmd中执行 ,查看git版本</span><br>
                            <span class="prompt">$</span> git version  
                        </div>
                    </div>
                </section>

                <!-- Git Structure Section -->
                <section id="structure" class="mb-12">
                    <h2>四、Git基本结构</h2>
                    <div class="card bg-white p-6 mb-4">
                        <div class="grid md:grid-cols-2 gap-4 mb-4">
                            <div>
                                <h3 class="font-semibold text-lg mb-2">工作区 (Workspace)</h3>
                                <p class="text-gray-700">基本文件的存放区</p>
                            </div>
                            <div>
                                <h3 class="font-semibold text-lg mb-2">暂存区 (Index/Stage)</h3>
                                <p class="text-gray-700">基本文件添加到暂存区后才会被Git管理（提交、更新）</p>
                            </div>
                            <div>
                                <h3 class="font-semibold text-lg mb-2">本地仓库 (Repository)</h3>
                                <p class="text-gray-700">本地的文件管理区域，提交代码或者更新代码的位置</p>
                            </div>
                            <div>
                                <h3 class="font-semibold text-lg mb-2">远程代码托管中心 (Remote)</h3>
                                <p class="text-gray-700">联合开发时，统一的文件联网管理中心</p>
                            </div>
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1669196085621-f1665dc5-a9b1-4ffb-8a96-aa1363aadcda.png" alt="Git结构图" class="mx-auto">
                        </div>
                    </div>
                </section>

                <!-- Repository Section -->
                <section id="repository" class="mb-12">
                    <h2>五、仓库</h2>
                    <div class="card bg-white p-6 mb-6">
                        <p class="mb-4">对应的就是一个目录，这个目录中的所有文件被git管理起来。</p>
                        <p class="mb-4">以后会将一个项目的根目录，作为仓库。</p>
                        <p>仓库中的每个文件的改动 都由git跟踪。</p>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">5.1 新建仓库</h3>
                        <div class="command-box mb-4">
                            <span class="comment"># 选择一个目录，执行指令：</span><br>
                            <span class="prompt">$</span> git init
                        </div>
                        <div class="grid md:grid-cols-2 gap-4">
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196086336-40f211c6-5f5a-4770-90c5-01a18b7bda07.jpeg" alt="新建仓库" class="mx-auto">
                            </div>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196087128-f5e64515-0c56-4365-87d6-3db5248dbec1.jpeg" alt="仓库目录" class="mx-auto">
                            </div>
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">5.2 工作区</h3>
                        <div class="card bg-white p-6">
                            <p class="mb-2">执行git init的目录即为工作区，如上例，D:\repo1目录即为工作区【不包含.git目录】</p>
                            <p>所有文件，都首先在工作区新建，然后可以存入仓库(版本库)，进行版本控制。</p>
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">5.3 暂存区</h3>
                        <div class="card bg-white p-6">
                            <p>暂存区也在 .git 目录内，工作区的文件进入仓库时，要先进入暂存区。</p>
                        </div>
                    </div>

                    <div>
                        <h3 class="text-xl font-semibold mb-4">5.4 本地仓库</h3>
                        <div class="card bg-white p-6">
                            <p>本地的文件管理区域，提交代码或者更新代码的位置</p>
                        </div>
                    </div>
                </section>

                <!-- Basic Operations Section -->
                <section id="operations" class="mb-12">
                    <h2>六、基本操作</h2>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">6.1 查看仓库状态</h3>
                        <div class="command-box mb-4">
                            <span class="comment"># 执行 git status 可以看到工作区中文件的状态</span><br>
                            <span class="prompt">$</span> git status
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196087720-a4ef60c5-2a7f-42d2-b5ef-a3e1f2387b3d.jpeg" alt="未跟踪状态文件" class="mx-auto">
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">6.2 暂存文件</h3>
                        <div class="command-box mb-4">
                            <span class="comment"># 执行 git add . 将工作区中的文件全部存入暂存区</span><br>
                            <span class="prompt">$</span> git add .
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196088304-99952bca-aa35-4c1f-8528-718671a915c6.jpeg" alt="文件存入暂存区" class="mx-auto">
                        </div>
                    </div>

                    <div>
                        <h3 class="text-xl font-semibold mb-4">6.3 提交文件</h3>
                        <div class="command-box mb-4">
                            <span class="comment"># 执行 git commit -m "描述信息" 作用是将暂存区的文件存入分支，形成一个版本</span><br>
                            <span class="prompt">$</span> git commit -m "这里写提交的描述信息"
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196088960-f240ba15-837b-46e3-813f-24c751d73834.jpeg" alt="提交文件形成版本" class="mx-auto">
                        </div>
                    </div>
                </section>

                <!-- Remote Repository Section -->
                <section id="remote-repo" class="mb-12">
                    <h2>七、远程仓库</h2>
                    <div class="card bg-white p-6 mb-6">
                        <p class="mb-4">第5章中的仓库，其实是本地仓库。</p>
                        <p class="mb-4">当多人协同开发时，每人都在自己的本地仓库维护版本。</p>
                        <p>但很重要的一点是，多人之间需要共享代码、合并代码，此时就需要一个远程仓库。</p>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">7.1 远程仓库工作模式</h3>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196089819-7be90804-22ac-40a0-9863-387431eeb0e8.jpeg" alt="远程仓库工作模式" class="mx-auto">
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">7.2 远程仓库选型</h3>
                        <div class="card bg-white p-6">
                            <p class="mb-2">有很多远程仓库可以选择，比如 github(<a href="https://github.com/" target="_blank" class="text-blue-600 hover:underline">https://github.com/</a>),码云(<a href="https://gitee.com/" target="_blank" class="text-blue-600 hover:underline">https://gitee.com/</a>)；</p>
                            <p class="mb-2">此两种可以注册自己测试使用，但如果是商业项目，需要更多支持需要付费。</p>
                            <p>公司内部也可以有自己构建的远程仓库。</p>
                        </div>
                    </div>

                    <div>
                        <h3 class="text-xl font-semibold mb-4">7.3 基本操作</h3>
                        <p class="mb-4">每个开发人员，在面对远程仓库时，会面临的一些基本操作。</p>

                        <div class="mb-8">
                            <h4 class="text-lg font-semibold mb-3">7.3.1 注册git服务器账号</h4>
                            <p class="mb-4">在 <a href="https://gitee.com/" target="_blank" class="text-blue-600 hover:underline">码云</a> 注册账号，并登录。</p>
                            <p class="mb-4">进入公司后，很可能会使用公司自己搭建的git服务器，则账号向领导索要即可</p>
                            <div class="grid md:grid-cols-2 gap-4">
                                <div class="image-container">
                                    <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196090408-f1f442de-4baa-4940-8cef-38e1b75b2c40.jpeg" alt="码云注册" class="mx-auto">
                                </div>
                                <div class="image-container">
                                    <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196090977-a3181cd7-a55f-47a2-9784-12ce33f41c8f.jpeg" alt="码云主页" class="mx-auto">
                                </div>
                            </div>
                        </div>

                        <div class="mb-8">
                            <h4 class="text-lg font-semibold mb-3">7.3.2 新建远程仓库</h4>
                            <div class="grid md:grid-cols-1 gap-4">
                                <div class="image-container">
                                    <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196091461-837e5995-48c5-4c95-99e2-9a795c80f83c.jpeg" alt="创建远程私有仓库-01" class="mx-auto">
                                </div>
                                <div class="image-container">
                                    <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196092082-c40effce-6f72-47c8-828f-22ebede4c287.jpeg" alt="创建远程私有仓库-02" class="mx-auto">
                                </div>
                                <div class="image-container">
                                    <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196092628-aac54a8b-a947-4fb6-bad1-85037910672e.jpeg" alt="创建远程私有仓库-03" class="mx-auto">
                                </div>
                            </div>
                        </div>

                        <div class="mb-8">
                            <h4 class="text-lg font-semibold mb-3">7.3.3 本地关联远程仓库</h4>
                            <p class="mb-4">本文档中选用仓库的 https协议的地址，将此地址关联到本地git中</p>
                            <div class="command-box">
                                <span class="prompt">$</span> git remote add origin https://gitee.com/yourname/repo1.git
                            </div>
                            <div class="image-container mt-4">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196093011-f5db2329-149a-48b4-94ff-ba5598971512.jpeg" alt="关联远程仓库" class="mx-auto">
                            </div>
                        </div>

                        <div class="mb-8">
                            <h4 class="text-lg font-semibold mb-3">7.3.4 推送文件到远程仓库</h4>
                            <p class="mb-4">将本地仓库中已经commit的内容push到远程仓库，以共享自己的代码。</p>
                            <div class="command-box mb-4">
                                <span class="prompt">$</span> git push origin master
                            </div>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196093568-6df953e9-48cd-49a9-9a87-b53f7bb58408.jpeg" alt="push操作" class="mx-auto">
                            </div>
                            <div class="image-container mt-4">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196093947-bee2c4fc-b2c8-471e-80ec-74dff5705dd5.jpeg" alt="输入凭证" class="mx-auto">
                            </div>
                        </div>

                        <div class="mb-8">
                            <h4 class="text-lg font-semibold mb-3">7.3.5 克隆远程仓库</h4>
                            <p class="mb-4">如果仓库已经由别人创建完毕，我们需要其中的内容，则可以通过 git clone 将其复制到本地。</p>
                            <div class="command-box mb-4">
                                <span class="prompt">$</span> git clone https://gitee.com/yourname/repo1.git
                            </div>
                            <div class="grid md:grid-cols-2 gap-4">
                                <div class="image-container">
                                    <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196094596-5f0a490d-3cfe-41bd-8586-1e1f5a2ddfa0.jpeg" alt="克隆仓库" class="mx-auto">
                                </div>
                                <div class="image-container">
                                    <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196094931-ac3b0201-f169-4cdd-b28e-4ef6f8d588bd.jpeg" alt="克隆结果" class="mx-auto">
                                </div>
                            </div>
                        </div>

                        <div class="mb-8">
                            <h4 class="text-lg font-semibold mb-3">7.3.6 代码共享</h4>
                            <p class="mb-4">多人协同开发时，写好代码的git push 上传到远程仓库；需要代码的 git pull 拉取代码即可。</p>
                            <div class="image-container mb-4">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196095510-4d18a7db-0b49-4047-9e52-465fd886abdd.jpeg" alt="上传到远程仓库" class="mx-auto">
                            </div>
                            <div class="command-box mb-4">
                                <span class="comment"># 重点：此时另一方如果想获得更新，则需要做一次拉取</span><br>
                                <span class="prompt">$</span> git pull
                            </div>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196096004-e26e4125-4bc0-4950-8f4a-f0e420cc59c3.jpeg" alt="拉取代码" class="mx-auto">
                            </div>
                        </div>

                        <div>
                            <h4 class="text-lg font-semibold mb-3">7.3.7 命令汇总</h4>
                            <div class="table-container">
                                <table>
                                    <tr>
                                        <th>命令</th>
                                        <th>说明</th>
                                    </tr>
                                    <tr>
                                        <td>git remote add 标识名(master) 远程地址</td>
                                        <td>本地关联远程仓库</td>
                                    </tr>
                                    <tr>
                                        <td>git push 标识名 master</td>
                                        <td>将本地仓库内容上传到远程仓库</td>
                                    </tr>
                                    <tr>
                                        <td>git pull 标识名 master</td>
                                        <td>从远程仓库下载内容到本地仓库</td>
                                    </tr>
                                    <tr>
                                        <td>git clone 远程地址</td>
                                        <td>将远程仓库复制到本地，并自动形成一个本地仓库</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </section>

                <!-- Branch Section -->
                <section id="branch" class="mb-12">
                    <h2>八、分支</h2>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">8.1 分支简介</h3>
                        <div class="card bg-white p-6 mb-4">
                            <p class="mb-4">分支，是一个个版本最终存储的位置。</p>
                            <p>分支，就是一条时间线，每次git commit形成一个个版本，一个个版本依次存储在分支的一个个提交点上。</p>
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196096669-a0cca546-00b2-40c5-bbed-171583e06ed5.jpeg" alt="分支示意图" class="mx-auto">
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">8.2 分支基本操作</h3>

                        <div class="mb-6">
                            <h4 class="text-lg font-semibold mb-3">8.2.1 查看分支</h4>
                            <div class="command-box mb-4">
                                <span class="comment"># 查看当前仓库的分支</span><br>
                                <span class="prompt">$</span> git branch
                            </div>
                            <p class="mb-4">仓库中默认只有 master 分支</p>
                            <p class="mb-4">执行git commit时，默认是在master分支上保存版本。</p>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196097026-00a82b42-7ec9-4139-ac79-9153e4173153.jpeg" alt="查看分支" class="mx-auto">
                            </div>
                        </div>

                        <div class="mb-6">
                            <h4 class="text-lg font-semibold mb-3">8.2.2 创建分支</h4>
                            <div class="command-box mb-4">
                                <span class="comment"># 创建dev分支</span><br>
                                <span class="prompt">$</span> git branch dev
                            </div>
                            <p class="mb-4">在商业项目开发过程中，我们不会轻易的在master分支上做操作。</p>
                            <p class="mb-4">我们会新建一个开发用的分支，在此分支上做版本的记录。</p>
                            <p class="mb-4">当代码确实没有问题时，才会将开发分支上成熟的代码版本添加到master分支上。</p>
                            <p>既保证开发过程中，可以及时记录版本，有保证master分支上每个提交点都是稳健版本。</p>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196097589-25775f1b-a291-4bd8-af9a-8bfc8d44cc32.jpeg" alt="创建分支" class="mx-auto">
                            </div>
                        </div>

                        <div>
                            <h4 class="text-lg font-semibold mb-3">8.2.3 切换分支</h4>
                            <div class="command-box mb-4">
                                <span class="comment"># 切换到dev分支</span><br>
                                <span class="prompt">$</span> git checkout dev
                            </div>
                            <p class="mb-4">默认情况下，当前使用的分支是 master分支</p>
                            <p class="mb-4">可以切换到 dev分支，则后续的git commit 便会在dev分支上新建版本(提交点)</p>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196098046-6e8b1838-5231-4b8c-880d-6fbe1e77940a.jpeg" alt="切换分支" class="mx-auto">
                            </div>
                            <div class="image-container mt-4">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196098383-fa042804-9d64-43ae-ae2f-086ad5a11120.jpeg" alt="查看分支情况" class="mx-auto">
                            </div>
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">8.3 新建分支细节</h3>
                        <p class="mb-4">新建分支时，新分支，默认有哪些内容？分支中包含了哪些次提交？</p>

                        <div class="mb-6">
                            <h4 class="text-lg font-semibold mb-3">8.3.1 新分支初始内容</h4>
                            <div class="card bg-white p-6 mb-4">
                                <p class="mb-2">每个分支都有一个指针，新建一个分支，首先是新建一个指针。</p>
                                <p>而且新分支的指针会和当前分支指向同一个提交点。</p>
                            </div>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196098705-f6cf93c8-7de3-4c3e-87b7-e93fe00961f1.jpeg" alt="新分支初始内容" class="mx-auto">
                            </div>
                        </div>

                        <div class="mb-6">
                            <h4 class="text-lg font-semibold mb-3">8.3.2 多分支走向</h4>
                            <div class="card bg-white p-6 mb-4">
                                <p>在master分支和新分支，分别进行 git add 和 git commit</p>
                            </div>
                            <div class="image-container mb-4">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196099066-eb318945-7902-4a5b-9f0b-4b596365cb22.jpeg" alt="分支增加commit" class="mx-auto">
                            </div>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196099440-3871433f-eec2-482c-b0a7-55d4c1b959b5.jpeg" alt="多分支commit" class="mx-auto">
                            </div>
                        </div>

                        <div>
                            <h4 class="text-lg font-semibold mb-3">8.3.3 分支提交日志</h4>
                            <p class="mb-4">查看分支的提交日志，进而看到分支中提交点的详细情况。</p>
                            <div class="command-box mb-4">
                                <span class="prompt">$</span> git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
                            </div>
                            <div class="image-container mb-4">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196099798-3bdec222-1fff-4a5b-b9b4-a122abfac48f.jpeg" alt="提交情况" class="mx-auto">
                            </div>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196100191-8df54fc5-67c2-4c0f-af9b-ae00f7c0e571.jpeg" alt="查看提交日志" class="mx-auto">
                            </div>
                        </div>
                    </div>

                    <div>
                        <h3 class="text-xl font-semibold mb-4">8.4 分支合并</h3>
                        <div class="card bg-white p-6 mb-4">
                            <p>合并分支的时候，需要定位到被合并的分支上，然后再执行merge命令将有新内容的分支合并过来。</p>
                            <p>比如将dev分支合并到maser分支上。</p>
                            <div class="command-box">
                                <span class="prompt">$</span> git checkout master<br>
                                <span class="prompt">$</span> git merge dev<br>
                                <span class="prompt">$</span> git add .<br>
                                <span class="prompt">$</span> git commit -m '提交的信息'<br>
                                <span class="prompt">$</span> git push origin master
                            </div>
                        </div>
                        <p class="mb-4">合并的方式有两种：快速合并 和 三方合并。</p>

                        <div class="mb-8">
                            <h4 class="text-lg font-semibold mb-3">8.4.1 快速合并</h4>
                            <p class="mb-4">如果分支A当前的修改，是完全基于分支B的修改而来，则B分支合并A分支，就是移动指针即可。</p>
                            <div class="image-container mb-4">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196100808-2597122c-d4a7-4262-a5e9-159fe3579e0e.jpeg" alt="合并前分支状态" class="mx-auto">
                            </div>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196101191-42d5d19d-718c-4336-a31a-91072ef64566.jpeg" alt="快速合并效果" class="mx-auto">
                            </div>
                        </div>

                        <div class="mb-8">
                            <h4 class="text-lg font-semibold mb-3">8.4.2 三方合并</h4>
                            <p class="mb-4">在不具备快速合并的条件下，会采用三方合并。</p>
                            <div class="image-container mb-4">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196101990-943b959d-fa5b-4cc1-9191-389759630cfd.jpeg" alt="合并前分支状态" class="mx-auto">
                            </div>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196102564-a58a3fac-4b5a-4c6e-951a-c18415a711e0.jpeg" alt="三方合并效果" class="mx-auto">
                            </div>
                        </div>

                        <div>
                            <h4 class="text-lg font-semibold mb-3">8.4.3 合并冲突</h4>
                            <p class="mb-4">两个分支进行合并，但它们含有对同一个文件的修改，则在合并时出现冲突，git无法决断该保留改文件哪个分支的修改。</p>

                            <div class="mb-6">
                                <h5 class="font-semibold mb-2">8.4.3.1 冲突演示</h5>
                                <p class="mb-2">场景模拟如下：</p>
                                <div class="grid md:grid-cols-2 gap-4 mb-4">
                                    <div class="image-container">
                                        <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196102994-f4bc5fce-97d6-432c-94b6-840e8a864f4a.jpeg" alt="master分支修改" class="mx-auto">
                                    </div>
                                    <div class="image-container">
                                        <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196103584-46e07fc3-5339-4c97-ab28-6932efdf063b.jpeg" alt="dev分支修改" class="mx-auto">
                                    </div>
                                </div>
                                <p class="mb-2">在master分支 合并 dev分支</p>
                                <div class="command-box mb-4">
                                    <span class="prompt">$</span> git merge dev
                                </div>
                                <div class="image-container mb-4">
                                    <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196104010-5c07c114-c19d-462d-b5fc-d78fe6374025.jpeg" alt="合并dev分支" class="mx-auto">
                                </div>
                                <p class="mb-2">此时，打开hig.txt 文件：</p>
                                <div class="image-container">
                                    <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196104508-538952d7-2e2f-4968-8954-378232fe52ea.jpeg" alt="冲突文件内容" class="mx-auto">
                                </div>
                            </div>

                            <div>
                                <h5 class="font-semibold mb-2">8.4.3.2 冲突解决</h5>
                                <p class="mb-4">出现冲突后，如要由两个开发人员当面协商，该如何取舍，为冲突文件定义最终内容。</p>
                                <div class="highlight-box mb-4">
                                    <p class="font-semibold mb-2">解决方案：</p>
                                    <ol class="list-decimal pl-5">
                                        <li>保留某一方的，删除另一方的</li>
                                        <li>保留双方的</li>
                                        <li>但无论如何，要记得删除 <<<< ==== >>>> 这些</li>
                                        <li>本质是两人协商为冲突的内容，定制出合理的内容。</li>
                                    </ol>
                                </div>
                                <div class="image-container mb-4">
                                    <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196105063-5331dcfa-078c-43e3-a042-876056dff04f.jpeg" alt="编辑冲突文件" class="mx-auto">
                                </div>
                                <div class="command-box">
                                    <span class="comment"># 提交 再次编辑后的文件</span><br>
                                    <span class="prompt">$</span> git add hig.txt<br>
                                    <span class="prompt">$</span> git commit -m "解决hig.txt冲突"
                                </div>
                                <div class="image-container mt-4">
                                    <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196105722-892c72b1-3efc-45f0-b844-4be2041a32c2.jpeg" alt="提交解决冲突" class="mx-auto">
                                </div>
                            </div>
                        </div>
                    </div>
                </section>

                <!-- Tags Section -->
                <section id="tags" class="mb-12">
                    <h2>标签</h2>
                    <div class="image-container mb-4">
                        <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1669196106086-377ee67b-6037-4138-b552-af4cb4584d82.png" alt="标签示意图" class="mx-auto">
                    </div>

                    <div class="grid md:grid-cols-3 gap-6">
                        <div class="card bg-white p-6">
                            <h3 class="text-xl font-semibold mb-4">创建一个标签</h3>
                            <div class="command-box">
                                <span class="prompt">$</span> git tag -a v1.0 -m "系统第一个版本开发完成"
                            </div>
                        </div>
                        <div class="card bg-white p-6">
                            <h3 class="text-xl font-semibold mb-4">删除一个标签</h3>
                            <div class="command-box">
                                <span class="prompt">$</span> git tag -d v1.0
                            </div>
                        </div>
                        <div class="card bg-white p-6">
                            <h3 class="text-xl font-semibold mb-4">推送标签到远程</h3>
                            <div class="command-box">
                                <span class="prompt">$</span> git push origin v1.0
                            </div>
                        </div>
                    </div>

                    <div class="mt-8">
                        <h3 class="text-xl font-semibold mb-4">项目发布后出现BUG的处理流程</h3>
                        <div class="command-box">
                            <span class="prompt">$</span> git checkout master<br>
                            <span class="prompt">$</span> git checkout -b bugfix-v1.0<br>
                            <span class="prompt">$</span> git add .<br>
                            <span class="prompt">$</span> git commit -m '修改了xxxBug'<br>
                            <span class="prompt">$</span> git pull<br>
                            <span class="prompt">$</span> git push origin bugfix-v1.0<br><br>
                            
                            <span class="comment"># 把Bug分支合并到develop</span><br>
                            <span class="prompt">$</span> git checkout develop<br>
                            <span class="prompt">$</span> git merge bugfix-v1.0<br>
                            <span class="prompt">$</span> git add .<br>
                            <span class="prompt">$</span> git commit -m '把Bug分支合并到develop'<br>
                            <span class="prompt">$</span> git pull<br>
                            <span class="prompt">$</span> git push origin develop<br><br>
                            
                            <span class="comment"># 把develop分支合并到Master</span><br>
                            <span class="prompt">$</span> git checkout master<br>
                            <span class="prompt">$</span> git merge develop<br>
                            <span class="prompt">$</span> git add .<br>
                            <span class="prompt">$</span> git commit -m '把develop分支合并到master'<br>
                            <span class="prompt">$</span> git pull<br>
                            <span class="prompt">$</span> git push origin master<br><br>
                            
                            <span class="comment"># 打一个新的版本并发布</span><br>
                            <span class="prompt">$</span> git tag -a v1.1 -m "修改xxxBug,优化了xxx功能"<br>
                            <span class="prompt">$</span> git push origin v1.1<br><br>
                            
                            <span class="comment"># 删除Bug分支</span><br>
                            <span class="prompt">$</span> git branch -d bugfix-v.1.0  <span class="comment">//删除本地分支</span><br>
                            <span class="prompt">$</span> git push origin :bugfix-v.1.0  <span class="comment">//删除远程分支</span>
                        </div>
                    </div>
                </section>

                <!-- Idea with Git Section -->
                <section id="idea-git" class="mb-12">
                    <h2>九、Idea关联Git</h2>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">9.1 关联git</h3>
                        <p class="mb-4">File > Settings 关联过程是自动的</p>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196106686-e8461873-a2e9-4e86-96ca-981050f97c64.jpeg" alt="Idea关联Git" class="mx-auto">
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">9.2 创建仓库</h3>
                        <div class="card bg-white p-6 mb-4">
                            <p class="mb-4">新建项目后，将项目目录创建为git仓库</p>
                            <p class="mb-4">不过，注意！！ 要先设置忽略文件 ".gitignore"!</p>
                            <p class="mb-2">作用：被忽略的文件会被版本记录忽略，版本中不包含它们。</p>
                            <p>范围：不需要和其他开发共享的文件，具体见下图。</p>
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196107114-6f2a2d84-f8ec-4e9c-9276-d55f6e061c89.jpeg" alt="添加忽略文件" class="mx-auto">
                        </div>
                        <div class="grid md:grid-cols-2 gap-4">
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196107657-def3b1e8-cee0-45a6-9038-d45178f18748.jpeg" alt="初始化仓库" class="mx-auto">
                            </div>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196108172-4e890571-e639-4ba3-829f-759849f52662.jpeg" alt="初始化结果" class="mx-auto">
                            </div>
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">9.3 提交-commit</h3>
                        <div class="card bg-white p-6 mb-4">
                            <p>创建好仓库后，做第一次提交。</p>
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196108726-30f45e54-dafa-4ffb-acd6-80d3bdb21635.jpeg" alt="选择提交菜单" class="mx-auto">
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196109266-58aaf7e8-caa4-4f7c-bae9-411bc897eb31.jpeg" alt="选择提交文件" class="mx-auto">
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196109814-9463a2f1-4cec-4a29-92cb-3fb89e1224d7.jpeg" alt="提交确认" class="mx-auto">
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">9.4 创建分支</h3>
                        <p class="mb-4">新建开发分支</p>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196110262-eebade11-da45-4b94-a82d-17b7e0969655.jpeg" alt="创建分支入口" class="mx-auto">
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196110608-4a37628d-8340-4d7e-9b7d-a3b7e72b02f8.jpeg" alt="新建分支" class="mx-auto">
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196110996-75a6e52c-e694-4c4b-9e74-8c947706cb55.jpeg" alt="查看当前分支" class="mx-auto">
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">9.5 上传到远程仓库(push)</h3>
                        <p class="mb-4">请首先参照第7章，创建一个远程仓库。</p>
                        <p class="mb-4">要求是裸库，且建议库名和项目名同名。</p>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196111400-8b09cc50-1cbc-4396-a661-aa41aef6fb9f.jpeg" alt="选择push菜单" class="mx-auto">
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196111872-36def71e-84b6-4267-b68f-6f49040155eb.jpeg" alt="定义远程仓库地址" class="mx-auto">
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196112416-0e9425d4-45de-4ce3-b416-12c7922938c0.jpeg" alt="执行push操作" class="mx-auto">
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196112980-54581731-dddd-49de-a174-bc8688c5e923.jpeg" alt="push成功提示" class="mx-auto">
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">9.6 复制到本地仓库(clone)</h3>
                        <p class="mb-4">如果有建好的远程仓库，比如公司内已经在用的仓库，或者github，码云上的一些公开仓库。</p>
                        <p class="mb-4">可以用将其复制到本地使用</p>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196113432-1dacfd87-1bef-45d4-8a24-77eb5ba3ccc9.jpeg" alt="点击克隆菜单" class="mx-auto">
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196114046-54704179-01fa-4b47-8b40-f7f8ce006af0.jpeg" alt="输入远程仓库地址" class="mx-auto">
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196114495-03e48f73-066f-4cea-9f5a-4abde3d04ae5.jpeg" alt="打开项目" class="mx-auto">
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196114985-fd8fd249-d6d2-4aee-8b58-87337600e21f.jpeg" alt="打开项目选项" class="mx-auto">
                        </div>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">9.7 更新本地项目</h3>
                        <p class="mb-4">如果远程仓库有更新，则你的本地项目也需要一起更新。</p>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196115591-15bbe775-7190-47c8-a4c3-fbb8fddcd824.jpeg" alt="选择pull菜单" class="mx-auto">
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196116050-fbee641d-2b3b-4c1c-b534-ec39c620ce7f.jpeg" alt="执行pull操作" class="mx-auto">
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196116542-0789202b-2011-48bb-857d-4bc23532ade1.jpeg" alt="更新日志显示" class="mx-auto">
                        </div>
                    </div>

                    <div>
                        <h3 class="text-xl font-semibold mb-4">9.8 冲突解决</h3>
                        <p class="mb-4">合并分支时，如果出现冲突，则需要解决冲突。</p>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196117088-093f92b8-7d47-4042-b876-8e0165f0fdac.jpeg" alt="冲突解决选项" class="mx-auto">
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196117624-b6006940-59af-490a-ace9-ca169120a7a9.jpeg" alt="直接修改冲突文件" class="mx-auto">
                        </div>
                    </div>
                </section>

                <!-- Team Development Section -->
                <section id="team-dev" class="mb-12">
                    <h2>十、多人协同开发</h2>
                    <div class="card bg-white p-6 mb-6">
                        <p>多人开发协同，git操作</p>
                    </div>

                    <div class="mb-8">
                        <h3 class="text-xl font-semibold mb-4">10.1 项目管理员(项目经理)</h3>
                        <div class="card bg-white p-6 mb-4">
                            <ol class="list-decimal pl-5">
                                <li class="mb-2">由管理员负责创建一个远程库，初始的库中什么也没有，为裸库。库的名称建议和项目同名</li>
                                <li class="mb-2">管理员会在idea中创建一个初始项目,其中包含.gitignore文件。并在项目根目录下 建立本地库。并建立 dev分支。</li>
                                <li class="mb-2">管理员将本地库上传到远程库</li>
                                <li class="mb-2">将其他开发人员拉入远程库的 开发成员列表中 ，使得其他开发人员可以访问该远程库。</li>
                            </ol>
                        </div>
                        <p class="mb-4">流程如下：</p>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196118139-59fe7065-1223-4491-8bdd-10bd141941c0.jpeg" alt="点击添加成员" class="mx-auto">
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196118644-2a3d64ed-21e6-4498-ad7c-148468b0c7d6.jpeg" alt="选择直接添加" class="mx-auto">
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196118995-2d028cf4-d471-4a00-83f3-b832eafb53ac.jpeg" alt="提交" class="mx-auto">
                        </div>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196119631-2a0d4dc1-8b70-4fd2-91c8-aed9deb068c1.jpeg" alt="查看已添加的开发成员" class="mx-auto">
                        </div>
                        <div class="card bg-white p-6">
                            <p class="mb-4">5> master分支设置为 protected分支，只有管理员有权限将代码合并到其中。dev分支设置为 常规分支所有开发人员都可以其中合并代码</p>
                            <div class="image-container mb-4">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196120139-b5a0ef7d-514d-41b9-b37e-04abc5594f4c.jpeg" alt="进入分支设置" class="mx-auto">
                            </div>
                            <div class="image-container">
                                <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196120756-5fa4ddce-c7fd-40f7-98fd-41764f2066b3.jpeg" alt="设置保护分支" class="mx-auto">
                            </div>
                        </div>
                    </div>

                    <div>
                        <h3 class="text-xl font-semibold mb-4">10.2 开发人员</h3>
                        <div class="card bg-white p-6">
                            <ol class="list-decimal pl-5">
                                <li class="mb-2">初始化：在idea中clone 远程库，获得项目。会建立本地库</li>
                                <li class="mb-2">后续的开发中，都要在dev分支上进行。开发完一个功能并测试通过后就commit 提交到本地的dev分支中，然后 上传(push)到远程dev分支中。</li>
                                <li class="mb-2">需要更新项目内容时，通过 pull 从远程仓库拉取内容。</li>
                                <li>注意：多人协同时，每次在 push 到远程库前，都先做一次pull，一来是把远程最新内容合并到本地，二来是核实本地内容是否和远程内容有冲突。</li>
                            </ol>
                            <p class="mt-4">后续的开发，会接到一个个的功能任务，往复操作 2>、3>、4> 而已。</p>
                        </div>
                    </div>
                </section>

                <!-- Classic Issues Section -->
                <section id="issues" class="mb-12">
                    <h2>十一、经典问题</h2>
                    <div class="card bg-white p-6 mb-4">
                        <p class="mb-4">在使用https协议做push时，如果曾经使用过码云，但密码有过改动，此时会报错</p>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196121241-a20891c3-979a-4e20-a65a-6fdbd14fd2d6.jpeg" alt="使用https协议报错" class="mx-auto">
                        </div>
                        <p class="mb-4">解决方案: 控制面板 》 凭据管理器 》 删除对应凭证，再次使用时会提示重新输入密码。</p>
                        <div class="image-container mb-4">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196121827-23d58c30-465d-40b6-b55f-37cf49873975.jpeg" alt="删除凭证" class="mx-auto">
                        </div>
                        <div class="image-container">
                            <img src="https://cdn.nlark.com/yuque/0/2022/jpeg/21449790/1669196122804-8874875c-4b1c-4439-9bd2-3fd3f6602cc0.jpeg" alt="凭证管理器" class="mx-auto">
                        </div>
                    </div>
                </section>
            </div>

            <!-- Sidebar -->
            <div class="w-full lg:w-1/4 mt-8 lg:mt-0">
                <div class="bg-white p-6 rounded-lg shadow-md nav-toc">
                    <h3 class="text-xl font-semibold mb-4 border-b pb-2">目录导航</h3>
                    <nav>
                        <a href="#introduction" class="active">一、引言</a>
                        <a href="#about-git">二、介绍</a>
                        <a href="#installation">三、Git安装</a>
                        <a href="#structure">四、Git基本结构</a>
                        <a href="#repository">五、仓库</a>
                        <a href="#operations">六、基本操作</a>
                        <a href="#remote-repo">七、远程仓库</a>
                        <a href="#branch">八、分支</a>
                        <a href="#tags">标签</a>
                        <a href="#idea-git">九、Idea关联Git</a>
                        <a href="#team-dev">十、多人协同开发</a>
                        <a href="#issues">十一、经典问题</a>
                    </nav>
                </div>
            </div>
        </div>
    </div>

    <!-- Footer -->
    <footer class="footer">
        <div class="container mx-auto px-6">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-4 md:mb-0">
                    <p class="text-lg font-semibold">技术小馆</p>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" target="_blank" class="text-gray-300 hover:text-white transition duration-300">
                        http://www.yuque.com/jtostring
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        // Highlight current section in TOC
        const sections = document.querySelectorAll('section');
        const navLinks = document.querySelectorAll('.nav-toc a');

        window.addEventListener('scroll', () => {
            let current = '';
            
            sections.forEach(section => {
                const sectionTop = section.offsetTop;
                const sectionHeight = section.clientHeight;
                
                if (pageYOffset >= (sectionTop - 300)) {
                    current = section.getAttribute('id');
                }
            });

            navLinks.forEach(link => {
                link.classList.remove('active');
                if (link.getAttribute('href') === `#${current}`) {
                    link.classList.add('active');
                }
            });
        });
    </script>
</body>
</html>
```